Load packages, functions, paths
library(dplyr)
##
## Attaching package: 'dplyr'
##
## The following objects are masked from 'package:stats':
##
## filter, lag
##
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyr)
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 3.2.3
library(calibrate)
## Loading required package: MASS
## Warning: package 'MASS' was built under R version 3.2.2
##
## Attaching package: 'MASS'
##
## The following object is masked from 'package:dplyr':
##
## select
library(knitr)
"%&%" = function(a,b) paste(a,b,sep="")
my.dir = "/Volumes/dolan-lab/hwheeler/ThePlatinumStudy/GWAS/"
res.dir <- my.dir %&% "genotypes/UMich_imputation_results/PrediXcan/PrediXcan_results/"
source(my.dir %&% "genotypes/qqunif_px.r")
source(my.dir %&% "manhattan.R")
tislist <- scan(my.dir %&% "pred_exp_list","c")
wfs1res <- data.frame()
for(tis in tislist){
res = read.table(res.dir %&% "N88_n953_rnGM412_ageaudio.cisp.10PCs_" %&% tis %&% ".linreg.PrediXcan",header=T)
newres = mutate(res,CHR=as.numeric(gsub("chr","",chr)),BP=start,SNP=gene) %>% arrange(CHR,BP)
res <- newres[complete.cases(newres),] #rm NAs
wfs1res <- rbind(wfs1res,filter(res,gene=="WFS1") %>% mutate(tissue=tis))
if(min(res$P)<0.0001){
manhattan(res,suggestiveline=FALSE,genomewideline = -log10(0.05/dim(res)[1]),main="rnGM412 " %&% tis,annotatePval = 0.0001,cex.main=0.8)
tophits <- dplyr::filter(res,P<=0.0001) %>% arrange(P) %>% dplyr::select(-CHR,-BP,-SNP)
cat('\n')
print(kable(tophits))
cat('\n')
}
else{
manhattan(res,suggestiveline=FALSE,genomewideline = -log10(0.05/dim(res)[1]),main="rnGM412 " %&% tis,cex.main=0.8)
cat('\n')
}
qq<-qqunif(res$P,plot=TRUE,title="rnGM412 " %&% tis)
cat('\n')
}
| Estimate | SE | t.value | P | n | gene | chr | strand | start | end | ensid |
|---|---|---|---|---|---|---|---|---|---|---|
| 17.88092 | 4.524379 | 3.952127 | 8.87e-05 | 512 | DHCR7 | chr11 | - | 71139239 | 71163914 | ENSG00000172893.11 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 2.941206 | 0.7072352 | 4.158738 | 3.77e-05 | 512 | ENSG00000185873.7 | chr4 | - | 69092371 | 69111438 | TMPRSS11B |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 1.449134 | 0.3548323 | 4.083996 | 5.16e-05 | 512 | ENSG00000204779.2 | chr9 | - | 70175707 | 70178815 | FOXD4L5 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.7657044 | 0.1926116 | 3.975381 | 8.07e-05 | 512 | ENSG00000258231.1 | chr12 | + | 58937907 | 59206842 | RP11-362K2.2 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 2.784477 | 0.6037721 | 4.611801 | 5.1e-06 | 512 | ENSG00000198765.7 | chr1 | + | 115397424 | 115537991 | SYCP1 |
| -1.191856 | 0.2631764 | -4.528736 | 7.4e-06 | 512 | ENSG00000140993.6 | chr16 | - | 3353759 | 3355150 | TIGD7 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 1.128057 | 0.2791737 | 4.040698 | 6.17e-05 | 512 | ENSG00000126785.8 | chr14 | + | 63670832 | 63759937 | RHOJ |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| -0.8323534 | 0.2112283 | -3.94054 | 9.29e-05 | 512 | ENSG00000159023.14 | chr1 | + | 29213603 | 29442315 | EPB41 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| -1.727885 | 0.4036983 | -4.28014 | 2.24e-05 | 512 | ENSG00000266173.1 | chr17 | - | 61787851 | 61819330 | STRADA |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.3131696 | 0.0795167 | 3.938414 | 9.37e-05 | 512 | ENSG00000157259.6 | chr7 | + | 92076767 | 92088150 | GATAD1 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| -8.188064 | 1.7716557 | -4.621702 | 4.90e-06 | 512 | ENSG00000152518.5 | chr2 | - | 43449541 | 43453748 | ZFP36L2 |
| 1.141962 | 0.2514928 | 4.540734 | 7.00e-06 | 512 | ENSG00000081041.8 | chr4 | - | 74962752 | 74965010 | CXCL2 |
| -1.360753 | 0.3217150 | -4.229683 | 2.79e-05 | 512 | ENSG00000103449.7 | chr16 | - | 51169886 | 51185278 | SALL1 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 2.31032 | 0.5339844 | 4.326569 | 1.83e-05 | 512 | ENSG00000166685.7 | chr17 | + | 71189129 | 71203047 | COG1 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| -1.277628 | 0.3033912 | -4.211159 | 3.02e-05 | 512 | ENSG00000163898.5 | chr3 | - | 185224050 | 185270401 | LIPH |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| -0.5075917 | 0.1239854 | -4.093964 | 4.95e-05 | 512 | ENSG00000163297.12 | chr4 | - | 80822303 | 81046608 | ANTXR2 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| -1.877541 | 0.3319178 | -5.656644 | 0 | 512 | ENSG00000196228.2 | chr2 | + | 108863651 | 108881807 | SULT1C3 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 3.010339 | 0.6883930 | 4.372995 | 1.49e-05 | 512 | ENSG00000168484.8 | chr8 | + | 22016126 | 22021992 | SFTPC |
| -0.658866 | 0.1666127 | -3.954477 | 8.78e-05 | 512 | ENSG00000184608.4 | chr8 | + | 11225911 | 11296167 | C8orf12 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 17.24085 | 4.292209 | 4.016779 | 6.81e-05 | 512 | ENSG00000185818.7 | chr4 | + | 2061239 | 2070816 | NAT8L |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 11.8865245 | 2.8499725 | 4.170751 | 3.58e-05 | 512 | ENSG00000144228.4 | chr2 | + | 139259371 | 139331117 | SPOPL |
| 1.0510598 | 0.2532427 | 4.150404 | 3.90e-05 | 512 | ENSG00000118402.5 | chr6 | - | 80624529 | 80657297 | ELOVL4 |
| 1.5094305 | 0.3666612 | 4.116690 | 4.50e-05 | 512 | ENSG00000066336.7 | chr11 | - | 47376411 | 47400127 | SPI1 |
| 0.8091094 | 0.2009450 | 4.026522 | 6.54e-05 | 512 | ENSG00000180488.10 | chr1 | + | 78245309 | 78344106 | FAM73A |
| 3.0919529 | 0.7708814 | 4.010932 | 6.98e-05 | 512 | ENSG00000166173.9 | chr15 | - | 71123863 | 71146498 | LARP6 |
| -2.9586827 | 0.7522423 | -3.933151 | 9.57e-05 | 512 | ENSG00000099338.18 | chr19 | + | 38826415 | 38861589 | CATSPERG |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.518625 | 0.1273885 | 4.071207 | 5.44e-05 | 512 | ENSG00000204305.9 | chr6 | - | 32148745 | 32150978 | AGER |
| -6.619389 | 1.6485619 | -4.015250 | 6.85e-05 | 512 | ENSG00000185873.7 | chr4 | - | 69092371 | 69111438 | TMPRSS11B |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.7297674 | 0.1728359 | 4.222313 | 2.88e-05 | 512 | ENSG00000103091.10 | chr16 | - | 74907468 | 75031071 | WDR59 |
| -1.6279861 | 0.4099694 | -3.970995 | 8.21e-05 | 512 | ENSG00000168298.4 | chr6 | + | 26156559 | 26157343 | HIST1H1E |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 1.624558 | 0.4008128 | 4.053159 | 5.86e-05 | 512 | ENSG00000123444.9 | chr11 | - | 47597118 | 47597251 | KBTBD4 |
| Estimate | SE | t.value | P | n | ensid | chr | strand | start | end | gene |
|---|---|---|---|---|---|---|---|---|---|---|
| 4.0381296 | 0.9686581 | 4.168787 | 3.61e-05 | 512 | ENSG00000083799.13 | chr16 | + | 50775961 | 50835846 | CYLD |
| -0.6462027 | 0.1635625 | -3.950800 | 8.91e-05 | 512 | ENSG00000160200.13 | chr21 | - | 44473301 | 44497053 | CBS |
kable(dplyr::select(wfs1res,-CHR,-BP,-SNP))
| Estimate | SE | t.value | P | n | gene | chr | strand | start | end | ensid | tissue |
|---|---|---|---|---|---|---|---|---|---|---|---|
| -0.2555898 | 0.2242715 | -1.1396448 | 0.2549821 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | DGN-WB |
| -2.5065203 | 0.8537576 | -2.9358689 | 0.0034799 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Adipose-Subcutaneous_ElasticNet.0.5 |
| -2.8904565 | 0.8928050 | -3.2375003 | 0.0012862 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_AdrenalGland_ElasticNet.0.5 |
| 0.0542483 | 0.2206135 | 0.2458975 | 0.8058629 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Artery-Coronary_ElasticNet.0.5 |
| -0.2435284 | 0.4313156 | -0.5646176 | 0.5725881 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Artery-Tibial_ElasticNet.0.5 |
| -0.1057435 | 0.0505794 | -2.0906435 | 0.0370664 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Brain-CerebellarHemisphere_ElasticNet.0.5 |
| -0.1718972 | 0.0695706 | -2.4708299 | 0.0138137 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Brain-Cerebellum_ElasticNet.0.5 |
| -0.5634426 | 0.9920715 | -0.5679456 | 0.5703279 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Brain-Hypothalamus_ElasticNet.0.5 |
| -0.2751333 | 0.2536470 | -1.0847092 | 0.2785753 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Heart-AtrialAppendage_ElasticNet.0.5 |
| 0.0431550 | 0.4187138 | 0.1030656 | 0.9179524 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Liver_ElasticNet.0.5 |
| -0.2954065 | 0.1133866 | -2.6053046 | 0.0094539 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Muscle-Skeletal_ElasticNet.0.5 |
| -0.6493673 | 0.2658083 | -2.4429908 | 0.0149125 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Nerve-Tibial_ElasticNet.0.5 |
| -0.0837388 | 0.0759499 | -1.1025534 | 0.2707537 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Skin-NotSunExposed-Suprapubic_ElasticNet.0.5 |
| -0.1868429 | 0.0828212 | -2.2559797 | 0.0245049 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Skin-SunExposed-Lowerleg_ElasticNet.0.5 |
| 0.0283218 | 0.1402027 | 0.2020060 | 0.8399945 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Spleen_ElasticNet.0.5 |
| -0.5249366 | 0.1942954 | -2.7017451 | 0.0071329 | 512 | WFS1 | chr4 | + | 6271576 | 6304992 | ENSG00000109501.9 | TW_Thyroid_ElasticNet.0.5 |